-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Introduce ArtifactDownloads
stdlib
#55755
base: master
Are you sure you want to change the base?
RFC: Introduce ArtifactDownloads
stdlib
#55755
Conversation
This shamelessly copies out of Pkg all of the bits required to actually download artifacts, etc. The motivation for this stdlib is to reduce the loading / dependency cost for downloading artifacts, esp. via LazyArtifacts. With this PR: ```console $ ./julia -e '@time using MicroMamba' 0.179380 seconds (188.20 k allocations: 10.800 MiB) ``` versus master: ```console $ ./julia -e '@time using MicroMamba' 1.857587 seconds (932.05 k allocations: 56.118 MiB, 6.27% gc time, 13.45% compilation time: 3% of which was recompilation) ```
Not sure it's a good idea yet, but nice work! 😁 Benchmarking nit.. The master comparison doesn't look like latest master
|
The master results are from 945517b - I'm just running on a totally different set of hardware than you (this was a quick measurement taken from my laptop) |
Fair enough. Pkg is so slow for you |
Again shamelessly ripped from Pkg - this only covers part of the functionality moved here (PlatformEngines). Moving the `Pkg.Artifacts` tests will be more involved, since they were written to also test interaction with a lot of other Pkg functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Sounds like a good idea to me. I see no reason why downloading artifacts should require Pkg.
@@ -890,7 +890,7 @@ static void jl_insert_into_serialization_queue(jl_serializer_state *s, jl_value_ | |||
} | |||
|
|||
if (immediate) // must be things that can be recursively handled, and valid as type parameters | |||
assert(jl_is_immutable(t) || jl_is_typevar(v) || jl_is_symbol(v) || jl_is_svec(v)); | |||
assert(jl_is_immutable(t) || jl_is_typevar(v) || jl_is_symbol(v) || jl_is_svec(v) || jl_is_module(v)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without it, adding this precompile
statement to LazyArtifacts causes this assertion to fail:
precompile(Tuple{typeof(Artifacts._artifact_str), Module, String, Base.SubString{String}, String, Base.Dict{String, Any}, Base.SHA1, Base.BinaryPlatforms.Platform, Val{LazyArtifacts}})
since this ends up serializing a Module as a type parameter
That's valid in principle, but it's still a TODO item here to make sure the serializer handles this correctly.
So I guess this mainly needs some more comments / buy-in from maybe some core people before its worthwhile to pursue turning it into a full-fledged proposal? @IanButterworth already commented (thanks), would be good to hear what others like e.g. @KristofferC @staticfloat think |
I agree with this in principle. All that remains are implementation details. |
@topolarity if you are still interested in getting this over the finish line, that'd be awesome |
This shamelessly copies out of Pkg all of the bits required to actually download artifacts, etc. The motivation for this stdlib is to reduce the loading / dependency cost for downloading artifacts, esp. via LazyArtifacts.
Draft because:
ArtifactDownloads.jl
should live in an external repostaticdata.c
change was done blindly and needs separate reviewWith this PR (+ LazyArtifacts.patch):
versus master (945517b):
Detailed timings
PR (+ LazyArtifacts.patch):
master (945517b):